package cn.sciento.onelink.sim.combo.category;

import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Data;

import java.util.HashMap;

/**
 * 目录节点实时查询
 * @author walton
 */
@Data
public class SimCategoryRequest extends LinkRequest<CommonResponse<SimCategoryResult>> {
    private String appId;
    private String token;
    private String queryScenes;

    public SimCategoryRequest(String appId, String token, String queryScenes) {
        super(LinkRequest.Method.GET);
        this.appId = appId;
        this.token = token;
        this.queryScenes = queryScenes;
        this.path = "/ec/query/categories";
        HashMap<String, Object> headMap = new HashMap<String, Object>();
        this.setHeader(headMap);
        HashMap<String, Object> bodyMap = new HashMap<String, Object>();
        bodyMap.put("transid", TransIdUtil.generate(appId));
        bodyMap.put("token",token);
        bodyMap.put("queryScenes",queryScenes);
        this.setCompleteUrl(this.path,bodyMap);
    }

}